
const TokenKey = 'Admin-Token'
const ReFreshToken = 'ReFresh_Token'

export function getToken() {
  return sessionStorage.getItem(TokenKey)
}
export function setToken(token) {
  return sessionStorage.setItem(TokenKey, token)
}

export function getReToken() {
  return sessionStorage.getItem(ReFreshToken)
}
export function setReToken(refresh_token) {
  return sessionStorage.setItem(ReFreshToken, refresh_token)
}

export function removeToken() {
  sessionStorage.removeItem(ReFreshToken)
  return sessionStorage.removeItem(TokenKey)
}

export function tokenString() {
  return '{"access_token": "' + getToken() + '","refresh_token": "' + getReToken() + '"}'
}
